﻿using System.Linq;
using MM.Data.Entity;
using MM.Services.decl;

namespace MM.Services.impl
{
    public class PrioritetService : BaseService, IPrioritetInterface
    {
        public Priority GetPrioritetById(int id)
        {
            return MyMoneyContext.Priorities.Find(id);
        }

        public void AddPrioritet(Priority priority)
        {
            if (priority != null) MyMoneyContext.Priorities.Add(priority);
        }

        public IQueryable<Priority> GetAllPriorities()
        {
            return MyMoneyContext.Priorities;
        }
    }
}